<table>
    <tr><th>Name</th><th>Simulator</th><th>Program</th><th>Inputfile</th><th>Attachment</th><th>Action</th></tr>
    <foreach name="items" item="vo">
        <tr>
            <td>{$vo['name']}</td>
            <td>{$vo['cmdline']}</td>
            <td>{$vo['program']}</td>
            <td>{$vo['inputfile']}</td>
            <?php if (!empty($vo['attachment'])) {
            ?>
                <td><a href="__APP__/Attachment/{$vo['attachment']}">Download</a></td>
            <?php } else {
            ?>
                <td>N/A</td>
            <?php } ?>
            <td>
                <a href="<?php echo U("Config/view", array("id" => $vo['id'])); ?>">View</a>
                <a href="<?php echo U("Config/rebuild", array("id" => $vo['id'])); ?>">Modify</a>
                <a href="<?php echo U("Config/delete", array("id" => $vo['id'])); ?>">Delete</a>
                <a href="<?php echo U("Test/perform", array("config_id" => $vo['id'])); ?>" target="_blank">Run</a>
            </td>
        </tr>
    </foreach>
</table>
<button onclick="buildnew();" type="button">
    Add new
</button>
<script type="text/javascript">
    function buildnew(){
        window.location = "<?php echo U("Config/build"); ?>";
    }
</script>